<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    {% include "./template/header.html" %} {% if (loginStatus) %}
    <div class="add"><a href="/addUser">新增用户</a></div>
    <table class="myTable">
      <tr class="myTitle">
        <th>ID</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>操作</th>
      </tr>
      {% asyncEach item in list %}
      <tr>
        <td>{{item.id}}</td>
        <td>{{item.userName}}</td>
        <td>{{item.age}}</td>
        <td>
          <a href="/editUser?id={{item.id}}" class="edit">编辑</a>
          <a href="/deleteUser?id={{item.id}}" class="delete">删除</a>
        </td>
        {% endeach %}
      </tr>
    </table>
    {% else %}
    <div class="home-no">
      <img src="images/timg.gif" alt="未登录" />
      <a href="/login" rel="noopener noreferrer">汪汪....您还未登陆，去登录</a>
    </div>
    {% endif %}
  </body>
</html>
